Skip to content

Fix error: Division by zero in c_factor - #4

Open
hellocoldworld wants to merge 1 commit into
mgckind:masterfrom
hellocoldworld:master
Open

Fix error: Division by zero in c_factor#4
hellocoldworld wants to merge 1 commit into
mgckind:masterfrom
hellocoldworld:master

Conversation

@hellocoldworld

Copy link
Copy Markdown

Hello! We were working with some experimental data and found out that in some cases the algorithm would throw an error because we were dividing by zero in the function c_factor. We narrowed down the bug and found that it was because some nodes of type 'exNode' are of size zero (these are generated in the method make_tree - lines 89-93). A simply change from the equality check to the minor or equal check fixed that for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant